home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
SVRAPI.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-13
|
47KB
|
1,322 lines
/********************************************************************/
/** Microsoft Windows **/
/** Copyright(c) Microsoft Corp., 1995 **/
/********************************************************************/
/********************************************************************
* *
* About this file ... SVRAPI.H *
* *
* This file contains information about the NetAccess, *
* NetConnection, NetFile, NetServer, NetSession, NetShare and *
* NetSecurity APIs. *
* There is a section for each set of APIs. *
* Each section contains: *
* *
* Function prototypes. *
* *
* Data structure templates. *
* *
* Definition of special values. *
* *
* Description of level of Win95 peer server support *
*
* For background information refer to the Lan Manager Programmer's
* Reference.
*
* WARNING:
* The APIs documented herein are not guaranteed to be supported
* in future versions of Windows. Their primary purpose is to *
* administer Win95 peer servers. *
* *
********************************************************************/
/*
* NOTE: Lengths of ASCIIZ strings are given as the maximum
* strlen() value. This does not include space for the
* terminating 0-byte. When allocating space for such an item,
* use the form:
*
* char username[LM20_UNLEN+1];
*
* An exception to this is the PATHLEN manifest, which does
* include space for the terminating 0-byte.
*
* User names, computer names and share names should be
* upper-cased by the caller and drawn from the ANSI
* character set.
*
*/
/*NOINC*/
#ifndef SVRAPI_INCLUDED
#define SVRAPI_INCLUDED
#pragma option -b
#pragma option -b.
#include <lmcons.h>
#pragma option -b
#pragma option -b.
#include <lmerr.h>
#pragma option -b
#ifndef RC_INVOKED
#pragma pack(1) /* Assume byte packing throughout */
#endif
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
#if !defined(_SVRAPI_)
#define API_FUNCTION DECLSPEC_IMPORT API_RET_TYPE APIENTRY
#else
#define API_FUNCTION API_RET_TYPE APIENTRY
#endif
/*INC*/
/****************************************************************
* *
* Access Class *
* *
****************************************************************/
/****************************************************************
* *
* Function prototypes - ACCESS *
*
* Requires User level security to be enabled
* *
* Peer Server Support:
* Remote support of these APIs on NWSERVER is limited as
* described below:
*
* NetAccessAdd -
* local and remote VSERVER - level 2
* remote NWSERVER - level 2
* NetAccessCheck - local only
* NetAccessDel -
* local, remote NWSERVER and remote VSERVER
* NetAccessEnum -
* sLevel 0 on remote NWSERVER (fRecursive = 1),
* slevel 0, 1, 2 on local and remote VSERVER
* NetAccessGetInfo -
* all sLevels on local and remote VSERVER,
* sLevel 0, 12 on remote NWSERVER
* NetAccessSetInfo -
* sLevel 1, 12 on local and remote VSERVER,
* sLevel 12 on remote NWSERVER
* parmnum = PARMNUM_ALL only
* NetAccessGetUserPerms - local and remote VSERVER only
****************************************************************/
extern API_FUNCTION
NetAccessAdd ( const char FAR * pszServer,
short sLevel,
char FAR * pbBuffer,
unsigned short cbBuffer );
extern API_FUNCTION
NetAccessCheck ( char FAR * pszReserved,
char FAR * pszUserName,
char FAR * pszResource,
unsigned short usOperation,
unsigned short FAR * pusResult );
extern API_FUNCTION
NetAccessDel ( const char FAR * pszServer,
char FAR * pszResource );
extern API_FUNCTION
NetAccessEnum ( const char FAR * pszServer,
char FAR * pszBasePath,
short fsRecursive,
short sLevel,
char FAR * pbBuffer,
unsigned short cbBuffer,
unsigned short FAR * pcEntriesRead,
unsigned short FAR * pcTotalAvail );
extern API_FUNCTION
NetAccessGetInfo ( const char FAR * pszServer,
char FAR * pszResource,
short sLevel,
char FAR * pbBuffer,
unsigned short cbBuffer,
unsigned short FAR * pcbTotalAvail );
extern API_FUNCTION
NetAccessSetInfo ( const char FAR * pszServer,
char FAR * pszResource,
short sLevel,
char FAR * pbBuffer,
unsigned short cbBuffer,
short sParmNum );
extern API_FUNCTION
NetAccessGetUserPerms ( char FAR * pszServer,
char FAR * pszUgName,
char FAR * pszResource,
unsigned short FAR * pusPerms );
/****************************************************************
* *
* Data structure templates - ACCESS *
* *
****************************************************************/
struct access_list {
char acl_ugname[LM20_UNLEN+1];
char acl_ugname_pad_1;
short acl_access;
}; /* access_list */
struct access_list_2
{
char FAR * acl2_ugname;
unsigned short acl2_access;
}; /* access_list_2 */
struct access_list_12
{
char FAR * acl12_ugname;
unsigned short acl12_access;
}; /* access_list_12 */
struct access_info_0 {
char FAR * acc0_resource_name;
}; /* access_info_0 */
struct access_info_1 {
char FAR * acc1_resource_name;
short acc1_attr; /* See values below */
short acc1_count;
}; /* access_info_1 */
struct access_info_2
{
char FAR * acc2_resource_name;
short acc2_attr;
short acc2_count;
}; /* access_info_2 */
struct access_info_10 {
char FAR * acc10_resource_name;
}; /* access_info_10 */
struct access_info_12
{
char FAR * acc12_resource_name;
short acc12_attr;